<?php
	namespace Home\Controller;
	use Think\Controller;
		
	class RegisterController extends Controller
	{
		public function index()
		{
			//查询问题提示列表
			$questionone=M('question')->select();
			$this->assign('questionone',$questionone);
			$this->display();
		}
		public function add()
		{
			
			//用户注册
			$result = M("userinfo")->data($_POST)->add();
			if($result > 0)
			{
				$this->success("注册成功！",__APP__."/Login/index");
			}
			else
			{
				$this->success("注册失败！",__APP__."/register/index");
			}
			
			
		}
	}
	
?>